const Amap = ({ location }) => {
    // 高德地图 iframe URL（可以换成你的地址坐标）
    const mapSrc = `https://m.amap.com/navi/?dest=${location.lng},${location.lat}&destName=目的地&key=543eb66160620adbfdbfe892cf1f8edf	`;
  
    return (
      <div className="w-full max-w-2xl mx-auto bg-base-100 shadow-xl rounded-xl">
        {/* <h2 className="text-xl font-bold mb-2 text-center">地址位置</h2> */}
        <div className="rounded-lg overflow-hidden">
          <iframe
            src={mapSrc}
            width="100%"
            height="250"
            allowFullScreen
            className="border-0 rounded-lg"
          />
        </div>
      </div>
    );
  };
  
  export default Amap;
  